package com.innoking.docsys.report.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by Administrator on 2019/8/15.
 */

@FeignClient(value = "user-service")
public interface UserRestInterface {

    @RequestMapping(value = "/home", method = RequestMethod.POST)
    String getInfo(@RequestBody String data);


    @RequestMapping(value = "/test", method = RequestMethod.GET)
    String test(@RequestParam("data") String data);

    /**
     * 根据用户id获取用户信息
     * @param data  入参为userId
     * @return
     */
    @RequestMapping(value = "/api/user/getUserbyId", method = RequestMethod.POST)
    String getUserbyId(@RequestBody  String data);

    /**
     * 根据组织机构code获取组织机构信息
     * @param data 入参为orgCode
     * @return
     */
    @RequestMapping(value = "/api/org/findOrgListByOrgCode", method = RequestMethod.POST)
    String getOrgbyOrgCode(@RequestBody  String data);

    /**
     * 根据组织机构id获取组织机构信息
     * @param data 入参为orgId
     * @return
     */
    @RequestMapping(value = "/api/org/findOrgListByOrgId", method = RequestMethod.POST)
    String getOrgbyOrgId(@RequestBody  String data);

    /**
     * 通过组织机构code获取全宗对象
     * @param data 入参为orgCode
     * @return
     */
    @RequestMapping(value = "/api/fonds/findfondsListByOrgCode ", method = RequestMethod.POST)
    String getFondsByOrgCode(@RequestBody  String data);

    /**
     * 通过全宗ID查询全宗信息
     * @param data 入参为fondsId
     * @return
     */
    @RequestMapping(value = "/api/fonds/findfondsListByfondsId ", method = RequestMethod.POST)
    String getFondsPojoByFondsId(@RequestBody String data);

}
